home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
- Dim fViewerStarted As Integer
- Dim fMovieRepeat As Integer
-
- Sub Form_Click ()
- StartViewer
- x = VwrCommand(vwr, szTitle, "PositionTopic(`main', 0, 0, 1023, 1023, 1, 1)", cmdOptNone)
- Startup.Hide
-
- fMovieRepeat = False
- Controller.Show
- Movie.Command = "stop"
- End Sub
-
- Sub Form_Load ()
-
- '
- 'Keep the user occupied with a nice movie while we
- 'get viewer started and load the title
- '
-
- SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
- Movie.FileName = "avi\startup.avi"
- Movie.hWndDisplay = MoviePicture.hWnd
-
- fViewerStarted = False
- fMovieRepeat = True
- Movie.Command = "open"
- Movie.Command = "play"
-
- End Sub
-
- Sub Form_Resize ()
- MoviePicture.Width = 200
- MoviePicture.Height = 90
- MoviePicture.Top = (ScaleHeight - MoviePicture.Height) / 2
- MoviePicture.Left = (ScaleWidth - MoviePicture.Width) / 2
- End Sub
-
- Sub Form_Unload (Cancel As Integer)
- Movie.Command = "close"
- End Sub
-
- Sub Movie_Done (NotifyCode As Integer)
- If fMovieRepeat Then
- Movie.To = 0
- Movie.Command = "seek"
- Movie.Command = "play"
- Beep
- End If
- End Sub
-
- Sub StartViewer ()
- Dim style As Long
- '
- ' By now we're up and running and the startup form is visible\
- ' It's time to find the viewer title or start it up afresh
- '
- szTitle = "roadshow.mvb"
- vwr = vwrFromMVB(szTitle)
- If vwr = 0 Then
- vwr = VwrCommand(0, szTitle, "HideButtonBar()", cmdOptNone)
- If vwr = 0 Then
- MsgBox szTitle, MB_ICONEXCLAMATION, "Can't load title"
- End
- End If
- End If
-
- hwndVwr = HwndFromVwr(vwr)
-
- '
- 'Once viewer has been started we want to remove the
- 'caption bar, get rid of the menus and buttons and
- 'position it full screen.
- '
- 'Note that we always use cmdOptNone to VwrCommand, we
- 'don't want any display until all is done.
- 'When all is done, jump to the front page
- '
- style = GetWindowLong(hwndVwr, GWL_STYLE)
- xl = SetWindowLong(hwndVwr, GWL_STYLE, style And (Not WS_CAPTION))
- x = VwrCommand(vwr, szTitle, "HideButtonBar()", cmdOptNone)
- x = VwrCommand(vwr, szTitle, "HideMenuBar()", cmdOptNone)
- End Sub
-
-